package com.dartfar.dictionary.model;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.OrderBy;
import javax.persistence.Table;

//数据字典目录
@Entity
@Table(name="Dict_Catalog")
public class Dictcatalog {
	
	private int id;

	private String dictName = "";

	private String code = "";

	private String des = "";

	private Set<Dictionary> dictionarys = new HashSet<Dictionary>();


	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getDictName() {
		return dictName;
	}

	public void setDictName(String dictName) {
		this.dictName = dictName;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDes() {
		return des;
	}

	public void setDes(String des) {
		this.des = des;
	}

	@OneToMany(mappedBy = "dictCatalog")
	@OrderBy(value="id")
	public Set<Dictionary> getDictionarys() {
		return dictionarys;
	}

	public void setDictionarys(Set<Dictionary> dictionarys) {
		this.dictionarys = dictionarys;
	}

}
